package com.itheima01;

import java.util.Arrays;

public class 大于130的 {

    public static void main(String[] args) {
        int[] arr = {130, 120, 145, 178, 96, 152, 165};

        int[] count = getdx(arr);

        for (int i = 0; i < count.length; i++) {
            System.out.println(count[i]);
        }

        System.out.println(Arrays.toString(count));
    }

    public static int[] getdx(int[] arr) {

        int[] newarr = new int[arr.length];

        for (int i = 0, y = 0; i < arr.length; i++) {

            if (arr[i] >= 130) {
                newarr[y] = arr[i];
                y++;
            }

        }
        return newarr;
    }
}
